#ifndef EDITEditChinaRawToSegyThread_H
#define EDITEditChinaRawToSegyThread_H

#include <QThread>
#include <util/define.h>
#include <datatype/segy.h>
#include <config/common.h>
#include <util/define.h>
#include <stdio.h>
#include <util/StartInfo.h>
#include <util/NavFile.h>
class EditChinaRawToSegyThread : public QThread
{
    Q_OBJECT
public:
    explicit EditChinaRawToSegyThread(QObject *parent = 0);
    union {
        unsigned char byteval[4];
        short tbytev[2];
        int  fbytev;
    } threeB2long ;

    bool init();
    void setFileList(QList<QString> fileList);
    void setInterval(int interval);
    void setSaveDirName(QString saveDirName);
    void setYanci(int yanchi);
    void setNavName(const QString navName);
    void setDecName(const QString decName);
protected:
    void run();

signals:
    void fileFinish(QString fileName);
    void fileAllEditChinaRawToSegyThread();
    void transformValue(double value);
    void showStr(QString str);
public:
    void getStart(QDateTime localTime, StartInfo *info);
    void setMerge(bool merge);
    void getData(int *&data1, int *&data2, int *&data3, int *&data4, StartInfo *info,int step,int rawformat);
    void setFormat(int format);
     void setNavList(QList<NavFile> *navList);
private:
    QList<QString> fileList;
    QString saveDirName;
    QString decName;
    QString navName;
    QString savaDir;
    Common *common;
    QDateTime startTime;
    QList<Dec> *decList;
    QList<NavFile> *navList;
    QList<FileInfo> *chinaInfoList;
    int interval;
    int yanchi;
    QString foldName;
    QString saveName1,saveName2,saveName3,saveName4;
    bool merge;
    ChinaObsData1 *chinaObs1;
    ChinaObsData2 *chinaObs2;
    int format;
    int rawformat;
    int globalPianyi;
    QString globalFileName;

};
#endif // EDITEditChinaRawToSegyThread_H
